{include file="public/header" /}

<div class="page">
  <form id="user_form" enctype="multipart/form-data" method="post">
    <table class="sc-default-table">
      <tbody>
      <tr class="noborder">
        <td class="required w120">投诉内容{$Think.lang.sc_colon}</td>
        <td class="vatop rowform">{:nl2br($consult.consult_content)}</td>
        <td class="vatop tips"></td>
      </tr>
      <tr class="noborder">
        <td class="required"><label class="validation" for="member_password">回复投诉{$Think.lang.sc_colon}</label></td>
        <td class="vatop rowform"><textarea  name="content" rows="3" class="w300" maxlength="150">{:nl2br($consult.consult_reply)}</textarea></td>
        <td class="vatop tips"></td>
      </tr>
      </tbody>
      <tfoot>
      <tr class="tfoot">
        <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.sc_submit}"/></td>
      </tr>
      </tfoot>
    </table>
  </form>
</div>
<script type="text/javascript">
  $(function() {
    //按钮先执行验证再提交表单
    $("#submitBtn").click(function() {
      if ($("#user_form").valid()) {
        $("#user_form").submit();
      }
    });
    $('#user_form').validate({
      errorPlacement: function(error, element) {
        error.appendTo(element.parent().parent().find('td:last'));
      },
      rules: {
        content: {
          required: true,
          maxlength: 200
        }
      },
      messages: {
        member_name: {
          required: '{$Think.lang.consult_reply_input_content}',
          maxlength: '{$Think.lang.consult_reply_input_content_tip}'
        }
      }
    });
  });
</script>
